import request from '@/utils/request';

// 用户登录
export function login(data) {
    return request({
        url: '/heart_lung/system_login',
        method: 'POST',
        data
    });
}

// 登录信息
export function system(params) {
    return request({
        url: '/heart_lung/system_login',
        method: 'get',
        params
    });
}

// 系统页面信息
export function getInfo(params) {
    return request({
        url: '/heart_lung/getHeartLungMonitorInfo',
        method: 'get',
        params
    });
}

// 开始测试
export function startTest(data) {
    return request({
        url: '/heart_lung/start_test',
        method: 'POST',
        data
    });
}

// 终止测试
export function stopTest(data) {
    return request({
        url: '/heart_lung/stop_test',
        method: 'POST',
        data
    });
}

// 结束测试
export function endTest(data) {
    return request({
        url: '/heart_lung/end_test',
        method: 'POST',
        data
    });
}

// 血压测试开始
export function bloodTest(data) {
    return request({
        url: '/heart_lung/send_blood_pressure_test',
        method: 'POST',
        data
    });
}

// 获取机构门店
export function getStoreList(params) {
    return request({
        url: '/heart/agencyStoreList',
        method: 'get',
        params
    });
}

// 获取备案号
export function getConfig() {
    return request({
        url: '/heart_lung/system_login ',
        method: 'get'
    });
}

// 心肺记录展示
export function getRecord(params) {
    return request({
        url: '/heart_lung/show_result',
        method: 'get',
        params
    })
}

// 提交心肺测试结果
export function submitResult(data) {
    return request({
        url: '/heart_lung/confirm_result',
        method: 'POST',
        data
    })
}

// 获取分析报告
export function getReport(params) {
    return request({
        url: '/heart_lung/report_back',
        method: 'get',
        params
    })
}